<script setup lang="ts">
import { PropType, reactive } from 'vue'
import type { cCommentData } from '@/api/comment/types'
import { Descriptions } from '@/components/Descriptions'
import { useI18n } from '@/hooks/web/useI18n'
import { ElTag } from 'element-plus'
import { DescriptionsSchema } from '@/types/descriptions'

const { t } = useI18n()

defineProps({
  currentRow: {
    type: Object as PropType<Nullable<cCommentData>>,
    default: () => null
  }
})

const schema = reactive<DescriptionsSchema[]>([
  {
    field: 'courseName',
    label: '课程名称'
  },
  {
    field: 'createDate',
    label: '上传时间'
  },
  {
    field: 'userNames',
    label: '上传人'
  },
  {
    field: 'coursePrice',
    label: '商品售价'
  },
  {
    field: 'coursePrimary',
    label: '课程关键字',
  },
  {
    field: 'classId',
    label: '课程分类',
  },
  {
    field: 'likeNum',
    label: '点赞量',
  },
  {
    field: 'collectNum',
    label: '收藏量',
  },
  {
    field: 'remarks',
    label: '评论量',
  },
  {
    field: 'courseIntro',
    label: '课程简介',
    span: 24
  }
])
</script>

<template>
  <Descriptions :schema="schema" :data="currentRow || {}">
    <template #importance="{ row }: { row: cCommentData }">

    </template>
  </Descriptions>
</template>
